﻿#pragma once
#include "Singleton.h"

class Vector3 : public Singleton<Vector3>
{
public:
	Vector3(float x, float y, float z)
	{
		this->x = x; this->y = y; this->z = z;
	}
	Vector3() : x(0), y(0), z(0)
	{
	}

	float x;
	float y;
	float z;

	float length();
	float distance(Vector3 f, Vector3 f1);
	Vector3 operator+(Vector3 a)
	{
		this->x += a.x;
		this->y += a.y;
		this->z += a.z;
		return *this;
	}
	Vector3 operator-(Vector3 a)
	{
		this->x -= a.x;
		this->y -= a.y;
		this->z -= a.z;
		return *this;
	}
};
